#pragma once

#include <QLineEdit>
#include "particledefine.h"
#include <QPushButton>

namespace ParticleEditor
{
	class ColorSettingWidget:public QWidget
	{
		Q_OBJECT
	public:
		ColorSettingWidget(QWidget* parent = NULL);
		~ColorSettingWidget();

		void initColorWidget(ParticleSystemLayer psl);
		void copyLayer(ParticleSystemLayer psl,ParticleSystemLayer newpsl);
	private:
		void changeCustomColorFromColor();
		void changeCustomColorToColor();

		QPushButton*					_pushButtonColorFrom;
		QPushButton*					_pushButtonColorTo;
		QLineEdit*						_colorFromA;
		QLineEdit*						_colorToA;
		ParticleSystemLayer				_particleSystemLayer;
		osg::Vec4						_colorFrom;
		osg::Vec4						_colorTo;
	private slots:
		void slotsColorFrom();
		void slotsColorTo();
	};
}